import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.util.Timer;
import java.util.TimerTask;
/**
 * Write a description of class Telephone here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Telephone extends Actor
{
    private long timeStarted = System.currentTimeMillis(); 
    private int nextring;
    private Office OfficeWorld;
    GreenfootSound sound = new GreenfootSound("ringtelephone.wav"); 

    
    public boolean inuse = false;
    

    
    public Telephone (){
        GreenfootImage image = getImage();
        image.scale(image.getWidth() - 150, image.getHeight() - 150);
        setImage(image);
        nextring = Greenfoot.getRandomNumber(30 * 1000);

    }

    public void act() 
    {   
          
        
    }
   
    public void ring()
    {
       
       turn(45);
       
    }
    

    public void setinuse(boolean inuse)  
    {   
        this.inuse = inuse;
        
    }  
    public boolean getinuse()
    {
        return inuse;        
    }
    
        
}
